/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Business;

import Entity.Etbl_Cars;
import Model.DALtbl_Cars;
import java.util.ArrayList;

/**
 *
 * @author Mr-aUgust
 */
public class Btbl_Cars {
    private DALtbl_Cars _objDALtbl_Cars=null;

    public Btbl_Cars() {
        _objDALtbl_Cars=new DALtbl_Cars();
    }
    public boolean addtbl_Cars(Etbl_Cars objEtbl_Cars){
        return _objDALtbl_Cars.addtbl_Cars(objEtbl_Cars);
    }
    public boolean edittbl_Cars(Etbl_Cars objEtbl_Cars){
        return _objDALtbl_Cars.edittbl_Cars(objEtbl_Cars);
    }
    public boolean deletetbl_Cars(int carId){
        if(carId>0)
           return  _objDALtbl_Cars.deletetbl_Cars(carId);
        else
            return false;
    }
    public Etbl_Cars getOne_Car(int CarId){
        if(CarId>0){
            return _objDALtbl_Cars.getOne_Car(CarId);
        }else{
            return null;
        }
    }
    public ArrayList<Etbl_Cars> getList_Cars(String orderBy, String ASCorDESC, String WhereClause, int PagingIndex, int PagingSize){
        return _objDALtbl_Cars.getList_Cars(orderBy, ASCorDESC, WhereClause, PagingIndex, PagingSize);
    }
    public ArrayList<Etbl_Cars> getTop10Car(){
        return _objDALtbl_Cars.getTop10Car();
    }
}
